Skip to main content

Insights API

Overview

Insights reports are one of IQM's analytics tools that help Advertisers quickly identify trends and apply precise adjustments to deliver better results for Campaigns. With pre-defined metrics and dimensions, Insights reports can be generated for Provider Level Data Reports and ScriptLift Studies Reports.

  • Provider Level Data (VLD) Reports include details about healthcare professionals targeted in your Campaigns, and provide similar details as VLD Reports while adhering to healthcare data privacy regulations.
  • ScriptLift Studies (SLS) Reports include key details about prescribing behaviors and how they are influenced by current and previous healthcare Campaigns.

More resources:

Authentication

Use the following header parameters for all requests:

Headers
Authentication
string required
Authentication bearer token
See Authentication Guide
X-IAA-OW-ID
integer required
Organization Worskpace ID Header

Provider Level Data Reports

PLD Resource Properties

Resource Properties
pldId
integer
PLD ID
pldName
string
PLD name
campaignId
integer
Campaign ID
campaignName
string
Campaign name
pldStatusId
integer
PLD Status Type ID
startDate
integer
Unix epoch timestamp of start date, in milliseconds
endDate
integer
Unix epoch timestamp of end date, in milliseconds
ioId
integer
Insertion Order ID
ioName
string
Insertion Order name
ioTypeId
integer
Insertion Order Budget Type ID
isCampaignEligible
boolean
Indicates that Campaign is eligible for VLD Report: true
pldCreatedOn
integer
Unix epoch timestamp of creation date, in milliseconds
creativeTypeId
integer
Creative Type ID
campaignPldTimezoneId
integer
Timezone ID
pldReportCreatable
boolean
Indicates if PLD Report can be generated for the given Campaign and date range (true)
pldChargeableImps
integer
The number of chargeable impressions for the requested PLD Report
pldChargedImps
integer
The number of impressions for which the PLD Report is already generated
pldChargeableCost
integer
Cost to generate the PLD Report
pldChargedCost
integer
Cost of PLD Report that is already generated
fundsAvailable
boolean
Indicates if sufficient funds are available in the Advertiser's account to generate the PLD Report (true)

Get List of PLD Reports

GET /api/v3/ins/pld-reports

Get a list of PLD Reports.

Query Parameters
searchField
string
Search results by keyword
noOfEntries
integer
Maximum number of entries per page, default: 200
pageNo
integer
Number of pages for retrieved data, default: 1
sortBy
string
Sorts by ascending (+) or descending (-), default: -pldId

See PLD Resource Properties for response property descriptions.

Response 200
{
"success": true,
"data": {
"totalRecords": 10,
"pldReportDataList": [
{
"pldId": 10,
"pldName": "530667_PLD_Insights_7",
"campaignName": "prod-campaign-21145",
"campaignId": 21145,
"pldStatusId": 3,
"startDate": 1732165200000,
"endDate": 1732424399000,
"ioId": 5,
"ioName": "Corporate, Inc.",
"isCampaignEligible": false,
"pldCreatedOn": 1721253632,
"creativeTypeId": 11,
"campaignPldTimezoneId": 29,
"ioTypeId": 1
},
{
"pldId": 9,
"pldName": "530667_PLD_Insights_6",
"campaignName": "Campaign-4949",
"campaignId": 4949,
"pldStatusId": 3,
"startDate": 1732165200000,
"endDate": 1732424399000,
"ioId": 15,
"ioName": "Quinton for Mayor",
"isCampaignEligible": false,
"pldCreatedOn": 1720325578,
"creativeTypeId": 14,
"campaignPldTimezoneId": 29,
"ioTypeId": 1
}
],
"filteredRecords": 10
}
}

Get List of Campaigns Eligible for PLD Reports

GET /api/v3/ins/pld-reports/campaigns

Get a list of Campaign IDs by status eligible for PLD Report generation.

Response Properties
running
array of integers
Campaign IDs with "running" status
paused
array of integers
Campaign IDs with "paused" status
expired
array of integers
Campaign IDs with "expired" status

See PLD Resource Properties for response property descriptions.

Response 200
{
"success": true,
"data": {
"running": [
12345,
12543
],
"paused": [
54321,
34521
],
"expired": [
33452,
22453
]
}
}

Generate PLD Report

POST /api/v3/ins/pld-report

This API calculates the cost for the impressions for the Provider Level Data Reports based on the impressions and mark up charged on the Organization and then creates the PLD Reports.

info

A Campaign must meet the following eligibility criteria to generate PLD Report:

  • Must be healthcare Campaign
  • "running", "expired" (within last 90 days), "paused" (within last 90 days) status
  • Must have duration of 3 or more days
  • Audience type: Matched Audience from NPI IDs
Request Schema
pldStartDate
integer
Unix epoch timestamp of start date, in milliseconds
pldEndDate
integer
Unix epoch timestamp of end date, in milliseconds
campaignId
integer
Campaign ID
pldId
integer
PLD ID to regenerate

See PLD Resource Properties for response property descriptions.

Request Sample
{
"campaignId": 12345,
"pldStartDate": 1722311000,
"pldEndDate": 1722315000
}
Response 200
{
"success": true,
"data": {
"pldReportCreated": true,
"campaignId": 1,
"campaignName": "Campaign Name",
"campaignStatus": "running",
"pldStartDate": 1722311000,
"pldEndDate": 1722315000,
"pldChargeableImps": 1000,
"pldChargedImps": 100,
"pldChargeableCost": 1000,
"pldChargedCost": 100,
"fundsAvailable": true
}
}
Response 200 (failure)
{
"success": true,
"data": {
"pldReportCreated": false,
"message": "PLD Insights can't be generated for this campaign at the moment as another insight with overlapping date range is processing"
}
}

Get PLD Reports Columns

GET /api/v3/ins/pld-reports/columns

Get columns details for PLD Reports.

The response properties for this endpoint include names of each possible column paired with a boolean value indicating whether it is included in the report (true) or not (false).

Response 200
{
"success": true,
"data": {
"id": true,
"insightsName": true,
"campaignName": true,
"campaignId": true,
"status": true,
"dateRange": true,
"createdOn": true,
"ioName": true,
"ioId": false
}
}

Update PLD Reports Columns

POST /api/v3/ins/pld-reports/columns

Save or update the selection of columns shown in PLD Reports.

The request schema and response properties for this endpoint include names of each possible column paired with a boolean value indicating whether it is included in the report (true) or not (false).

Request Sample
{
"id": true,
"insightsName": true,
"campaignName": true,
"campaignId": true,
"status": true,
"dateRange": true,
"createdOn": true,
"ioName": true,
"ioId": false
}
Response 200
{
"success": true,
"data": {
"id": true,
"insightsName": true,
"campaignName": true,
"campaignId": true,
"status": true,
"dateRange": true,
"createdOn": true,
"ioName": true,
"ioId": false
}
}

Download PLD Report

POST /api/v3/ins/pld-report/download

Get a download link for a PLD insight Report in CSV or XLSX format.

Request Schema
fileType
integer
File type ID
XLSX: 1
CSV: 2
pldId
integer
Provider Level Data Report ID
Response Properties
pldReportUrl
string
PLD Report File URL
Request Sample
{
"fileType": 1,
"pldId": 50
}
Response 200
{
"success": true,
"data": {
"pldReportUrl": "https://dowload.domain.com/pld-reports/20220101/pld-report-1.xlsx"
}
}
More Responses
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}

Delete PLD Report

DELETE /api/v3/ins/pld-reports

Deletes PLD Reports that are not marked as deleted and have a 'failed' status, requires user authorization and checks if the provided PLD IDs are valid.

Query Parameters
pldIds
string
Comma separated PLD IDs
Response Properties
success
boolean
Indicates Report was succesfully deleted: true
message
string
Success message
Response 200
{
"success": true,
"data": {
"message": "255944_PLD_Insights_2 deleted successfully"
}
}

ScriptLift Studies Reports

SLS Resource Properties

Resource Properties
slsId
integer
SLS ID
slsName
string
SLS name
campaignIds
array of integers
Campaign IDs
slsStatusId
integer
SLS Status Type ID
startDate
integer
Unix epoch timestamp of start date, in milliseconds
endDate
integer
Unix epoch timestamp of end date, in milliseconds
ioId
integer
Insertion Order ID
ioName
string
Insertion Order name
ioTypeId
integer
Insertion Order Budget Type ID
isCampaignEligible
boolean
Indicates that Campaign is eligible for SLS Report: true
slsCreatedOn
integer
Unix epoch timestamp of creation date, in milliseconds
campaignSlsTimezoneId
integer
Timezone ID
slsChargeableImps
integer
The number of chargeable impressions for the requested SLS Report
slsChargedImps
integer
The number of impressions for which the SLS Report is already generated
slsChargeableCost
integer
Cost to generate the SLS Report
slsChargedCost
integer
Cost of SLS Report that is already generated
pdfFileSize
integer
PDF file size in bytes
excelFileSize
integer
Excel file size in bytes
slsReportTypeIds
array of integers
SLS Report type IDs

Get List of SLS Reports

GET /api/v3/ins/sls-reports

Get a list of SLS Reports.

Query Parameters
searchField
string
Search results by keyword
noOfEntries
integer
Maximum number of entries per page, default: 200
pageNo
integer
Number of pages for retrieved data
sortBy
string
Sorts by ascending (+) or descending (-), default: -slsId
Response 200
{
"success": true,
"data": {
"totalRecords": 2,
"slsReportDataList": [
{
"slsId": 10,
"slsName": "530667_SLS_Insights_7",
"campaignIds": [
21145,
21146,
21147
],
"slsStatusId": 3,
"slsStatusName": "Failed",
"startDate": 1732165200000,
"endDate": 1732424399000,
"ioId": 5,
"ioName": "Corporate, Inc.",
"isCampaignEligible": false,
"slsCreatedOn": 1721253632,
"campaignSlsTimezoneId": 29,
"ioTypeId": 1,
"pdfFileSize": 2500000,
"excelFileSize": 2500000,
"slsReportTypeIds": [
1,
2,
3
]
},
{
"slsId": 9,
"slsName": "530667_SLS_Insights_6",
"campaignId": [
4949,
5959
],
"slsStatusId": 2,
"slsStatusName": "Processing",
"startDate": 1732165200000,
"endDate": 1732424399000,
"ioId": 15,
"ioName": "Quinton for Mayor",
"isCampaignEligible": false,
"slsCreatedOn": 1720325578,
"campaignSlsTimezoneId": 29,
"ioTypeId": 1,
"slsReportTypeIds": [
1,
3
]
},
],
"filteredRecords": 2
}
}

Generate SLS Report

POST /api/v3/ins/sls-reports

This API calculates the cost for the impressions for the ScriptLift Studies Reports based on the impressions and mark up charged on the Organization and then creates the PLD Reports.

Request Schema
ioId
integer
Insertion Order ID
campaignIds
array of integers
Campaign IDs
slsStartDate
integer
Unix epoch timestamp of start date, in milliseconds
slsEndDate
integer
Unix epoch timestamp of end date, in milliseconds
slsName
string
SLS name
slsLookbackDuration
integer
SLS lookback duration
conceptGroupId
integer
Concept group ID
reportTypes
array of integers
Report type IDs
competitorConceptGroupIds
array of integers
Competitor concept group IDs
Request Sample
{
"ioId": 1234,
"campaignIds": [
1,
2,
3
],
"slsStartDate": 1722311000,
"slsEndDate": 1722315000,
"slsName": "Dummy SLS Name",
"slsLookbackDuration": 3,
"conceptGroupId": 202335,
"reportTypes": [
1,
2,
3
],
"competitorConceptGroupIds": [
800214,
800215,
800216
]
}
Response 200
{
"success": true,
"data": {
"slsReportCreated": true,
"campaignIds": [
1,
2,
3
],
"slsStartDate": 1722311000,
"slsEndDate": 1722315000,
"slsChargeableImps": 1000,
"slsChargedImps": 100,
"slsChargeableCost": 1000,
"slsChargedCost": 100,
"slsName": "Dummy SLS Name",
"slsLookbackDuration": 3,
"conceptGroupId": 202335,
"reportTypes": [
1,
2,
3
],
"competitorConceptGroupIds": [
800214,
800215,
800216
],
"fundsAvailable": true
}
}

SLS Reports Computation

POST /api/v3/ins/sls-reports/computation

Calculates the cost for the impressions for the SLS Report based on impressions and the mark up charged on the Organization.

Request Schema
ioId
integer
Insertion Order ID
campaignIds
array of integers
Campaign IDs
slsStartDate
integer
Unix epoch timestamp of start date, in milliseconds
slsEndDate
integer
Unix epoch timestamp of end date, in milliseconds
slsName
string
SLS name
slsLookbackDuration
integer
SLS lookback duration
conceptGroupId
integer
Concept group ID
reportTypes
array of integers
Report type IDs
competitorConceptGroupIds
array of integers
Competitor concept group IDs
Request Sample
{
"ioId": 1234,
"campaignIds": [
1,
2,
3
],
"slsStartDate": 1722311000,
"slsEndDate": 1722315000,
"slsName": "Dummy SLS Name",
"slsLookbackDuration": 3,
"conceptGroupId": 202335,
"reportTypes": [
1,
2,
3
],
"competitorConceptGroupIds": [
800214,
800215,
800216
]
}
Response 200
{
"success": true,
"data": {
"slsReportCreated": true,
"campaignIds": [
1,
2,
3
],
"slsStartDate": 1722311000,
"slsEndDate": 1722315000,
"slsChargeableImps": 1000,
"slsChargedImps": 100,
"slsChargeableCost": 1000,
"slsChargedCost": 100,
"slsName": "Dummy SLS Name",
"slsLookbackDuration": 3,
"conceptGroupId": 202335,
"reportTypes": [
1,
2,
3
],
"competitorConceptGroupIds": [
800214,
800215,
800216
],
"fundsAvailable": true
}
}

Validate SLS Report Name

GET /api/v3/ins/sls-reports/validate/name

Validate a name for SLS Reports.

Query Parameters
reportName
string
Report name
Response Properties
success
boolean
Indicates successful validation
data
string
Success message
Response 200
{
"success": true,
"data": "This SLS report name is valid"
}

Get List of Campaigns Eligible for SLS Reports

GET /api/v3/ins/sls-reports/campaigns

Get a list of Campaign IDs by status eligible for VLD Report generation.

Response Properties
running
array of integers
Campaign IDs with "running" status
paused
array of integers
Campaign IDs with "paused" status
expired
array of integers
Campaign IDs with "expired" status
Response 200
{
"success": true,
"data": {
"running": [
12345,
12543
],
"paused": [
54321,
34521
],
"expired": [
33452,
22453
]
}
}

Download SLS Report

POST /api/v3/ins/sls-reports/download

Get a download link for a SLS Insight Report in CSV or XLSX format.

Request Schema
fileType
integer
File type ID
XLSX: 1
CSV: 2
slsId
integer
Practitioner Level Data Report ID
Response Properties
slsReportUrl
string
SLS Report File URL
Request Sample
{
"fileType": 1,
"slsId": 50
}
Response 200
{
"success": true,
"data": {
"pldReportUrl": "https://dowload.domain.com/pld-reports/20220101/pld-report-1.xlsx"
}
}
More Responses
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Invalid sortBy value."
}
]
}

Delete SLS Report

DELETE /api/v3/ins/sls-reports

Deletes SLS Reports that are not marked as deleted and have a 'failed' status, requires user authorization and checks if the provided SLS IDs are valid.

Query Parameters
slsIds
string
Comma separated SLS IDs
Response Properties
success
boolean
Indicates Report was succesfully deleted: true
message
string
Success message
Response 200
{
"success": true,
"data": {
"message": "255944_PLD_Insights_2 deleted successfully"
}
}